//js used by login/page_body
$(document).ready(function()
{
	var validator = $("#login_form").validate({	 
	     rules:{      
			username: { required: true, maxlength: 50 },
		   	pass: { required: true , minlength: 6, maxlength: 20}
	     },
	     messages:{
	        username: {required:"请输入登陆账户", maxlength:'最多输入50个字符' },
	        pass: { required:"请输入登陆密码", minlength:'密码最少6个字符', maxlength:'密码最多20个字符'}
	     },
	     submitHandler: function(form) 
	     {
	    	 form.submit();
	     }
	   });
});


//js userd by login/login_success
$(document).ready(function()
{
	function jump(count) 
	{   
		window.setTimeout(function()
		{   
			count--;   
			if(count > 0) 
			{   
				$("#num").attr('innerHTML', count);   
				jump(count);   
			} 
			else 
			{   
				window.location.href=$("#auto_jump_url").val();   
			}   
		}, 1000);   
	};   
	
	if($("#auto_jump_url").size()>0)
	{
		jump(5);
	}
});